"""
页面跳转
"""
from time import sleep
from selenium.webdriver.common.by import By
from cases.basecase import BaseCase
from page.shequ import SHEQU
from page.haowushe import HAOWUSHE
from page.wode import WODE
from tools.huadong import HUADONG
class TestRrzTz(BaseCase):
    def test_rrz_st_tz(self):
        hd = HUADONG(self.driver)
        hd.swipe_udlr()
        #点击社区
        ap = SHEQU(self.driver)
        ap.dj_shequ()
        sleep(2)
        hd.swipe_udlr()
        #向右滑动
        hd.swipe_right()
        sleep(2)
        #点击好物社
        bp = HAOWUSHE(self.driver)
        bp.dj_haowushe()
        sleep(2)
        hd.swipe_udlr()
        # 点击我的
        cp = WODE(self.driver)
        cp.dj_wode()
        sleep(2)
        #断言
        text = "登录注册表示同意《用户协议》及《隐私政策》"
        text1 = self.driver.find_element(By.ID, 'com.gfeng.daydaycook:id/spanTouchTv').text
        self.assertEqual(text, text1)



